package org.csu.demo.domain;


import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;

@Data
@TableName("category")
public class Category {

    @TableId(value = "catid")
    private String categoryId;
    private String name;
    @TableField("descn")
    private String description;

    @TableLogic
    @JsonIgnore
    private Integer deleted;

    @JsonIgnore
    public boolean isAllNull(){
        if(this.name !=null ||this.description !=null){
            return false;
        }else {
            return true;
        }
    }
}
